<template>
    <div id="index-container">
        <el-container direction="vertical">
            <el-header style="background: #f0f9eb; padding: 15px;">
                <Search></Search>
            </el-header>
            <el-main class="map-main">
                <div id="map-container" style="width: 100%; height: 100%">
                    <MapContainer @location-update="fowardLocation"></MapContainer>
                </div>
            </el-main>
        </el-container>
    </div>
</template>

<script>
import MapContainer from '../../components/MapContainer.vue'
import Search from '../../components/Search.vue'

export default {
    methods:{
        fowardLocation(location){
            this.$emit('location-update',location)
        }
    },
    components:{
        MapContainer,
        Search
    }
}
</script>

<style lang="less" scoped>
#index-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f0f9eb;

    .map-main {
        background-color: #fff;
        margin: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(103, 194, 58, 0.1);
    }
}
</style>